﻿[[title="周报列表",pagesize="20"]]
<script language="javascript" type="text/javascript">
    function changeWindowSize() {
        wmsCommon.setListDivStyle("listDiv", 1);
    }
    $(function () {
        wmsCommon.setListDivStyle("listDiv", 1);

    });
        function ExportExcel() {
            var form = $("<form>");
            form.attr('style', 'display:none');
            form.attr('target', '');
            form.attr('method', 'post');
            form.attr('action', 'Exec/ExportExcel.aspx');
            var input1 = $('<input>');
            input1.attr('type', 'hidden');
            input1.attr('name', 'FileType');
            input1.attr('value', 'ExportByTemplete');

            var input2 = $('<input>');
            input2.attr('type', 'hidden');
            input2.attr('name', 'departement');
            input2.attr('value', $("#departWBS").val());

            var input3 = $('<input>');
            input3.attr('type', 'hidden');
            input3.attr('name', 'userNo');
            input3.attr('value', $("#userNo").val());

            var input4 = $('<input>');
            input4.attr('type', 'hidden');
            input4.attr('name', 'reportStatus');
            input4.attr('value', $("#reportStatus").val());

            var input5 = $('<input>');
            input5.attr('type', 'hidden');
            input5.attr('name', 'startDate1');
            input5.attr('value', $("input[id*='startDate$1']").val());

            var input8 = $('<input>');
            input8.attr('type', 'hidden');
            input8.attr('name', 'startDate2');
            input8.attr('value', $("input[id*='startDate$2']").val());
            
            var input6 = $('<input>');
            input6.attr('type', 'hidden');
            input6.attr('name', 'endDate1');
            input6.attr('value', $("input[id*='endDate$1']").val());

            var input9 = $('<input>');
            input9.attr('type', 'hidden');
            input9.attr('name', 'endDate2');
            input9.attr('value', $("input[id*='endDate$2']").val());

            var input7 = $('<input>');
            input7.attr('type', 'hidden');
            input7.attr('name', 'path');
            input7.attr('value', 'Exec/templete/周报模板2013-2014.xls');

            var input10 = $('<input>');
            input10.attr('type', 'hidden');
            input10.attr('name', 'reportType');
            input10.attr('value', 'weekReport');

            $('body').append(form);
            form.append(input1);
            form.append(input2);
            form.append(input3);
            form.append(input4);
            form.append(input5);
            form.append(input6);
            form.append(input7);
            form.append(input8);
            form.append(input9);
            form.append(input10);
            form.submit();
        }
        function Search() {
            var depotWBS = $("#departWBS").val();
            var userNo = $("#userNo").val();
            var reportStatus = $("#reportStatus").val();
            var startDate$1 = $("input[id*='startDate$1']").val();
            var startDate$2 = $("input[id*='startDate$2']").val();
            var endDate$1 = $("input[id*='endDate$1']").val();
            var endDate$2 = $("input[id*='endDate$2']").val();
            var rootPath = wmsCommon.getRootPath();   
         }
</script>
<table class="listMainTable" height="100%" cellpadding="0" cellspacing="0">
    <tr>
        <td style="height: 40px">
            <table cellspacing="0" cellpadding="0" class="tblSearchParent">
                <tr>
                    <td class="TblSearchPanel_01">
                    </td>
                    <td class="TblSearchPanel_02">
                        <div class="DivSearchTitle" style="float: left;">
                            查询条件</div>
                        <img alt="点此隐藏或显示搜索区域" id="Image2" src="res/images/display.gif" class="ImgSearch"
                            onclick="wmsCommon.searchContentCtr()" />
                    </td>
                    <td class="TblSearchPanel_03">
                    </td>
                </tr>
                <tr>
                    <td class="TblSearchPanel_04">
                    </td>
                    <td>
                        <!-- search content start -->
                        <table id="tblSearch" class="SearchTable">
                            <tr>
                                <td style="text-align: left; width: 100%;">
                                    <table style="width: auto;">
                                        <tr>
                                            <td class="tdright">
                                                <nobr>
                                             $weekReport_list.Columns.get_Item("departWBS").DisplayName()：
                                                </nobr>
                                            </td>
                                            <td class="tdleft">
                                                $weekReport_list.Columns.get_Item("departWBS").RenderAsQuery()
                                            </td>
                                            <td class="tdright">
                                                <nobr>
                                                $weekReport_list.Columns.get_Item("userNo").DisplayName()：
                                                </nobr>
                                            </td>
                                            <td class="tdleft">
                                                $weekReport_list.Columns.get_Item("userNo").RenderAsQuery()
                                            </td>
                                             <td class="tdright">
                                                <nobr>
                                                $weekReport_list.Columns.get_Item("reportStatus").DisplayName()：
                                                </nobr>
                                            </td>
                                            <td class="tdleft" id="Td1">
                                                $weekReport_list.Columns.get_Item("reportStatus").RenderAsQuery()
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="tdright">
                                                <nobr>
                                                报告开始周期：
                                                </nobr>
                                            </td>
                                            <td class="tdleft" colspan="5" >
                                                $weekReport_list.Columns.get_Item("startDate").RenderAsQuery()
                                            </td>
                                        </tr>
                                          <tr>
                                             <td class="tdright">
                                                <nobr>
                                                报告结束周期：
                                                </nobr>
                                            </td>
                                            <td class="tdleft"  colspan="5" >
                                                $weekReport_list.Columns.get_Item("endDate").RenderAsQuery()
                                            </td>
                                           
                                        </tr>
                                    </table>
                                </td>
                                <td style="vertical-align: bottom;">
                                    <div style="width: 100%;">
                                        $render.RenderButton()
                                    </div>
                                </td>
                                <td style="vertical-align: bottom;">$render.RenderButton(" text=导出Excel; displayType=button;actionType=outExcel; clientMethod=ExportExcel();")</td>
                            </tr>
                        </table>
                        <!-- search content end-->
                    </td>
                    <td class="TblSearchPanel_06">
                    </td>
                </tr>
                <tr>
                    <td class="TblSearchPanel_07">
                    </td>
                    <td class="TblSearchPanel_08">
                    </td>
                    <td class="TblSearchPanel_09">
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td style="height: 20px;">
            <!--button content start-->
            <table class="controlContent" cellpadding="0" cellspacing="0">
                <tr class="rowEven">
                    <td style="text-align: right;">
                        $render.RenderButton(" text=新增; displayType=button; actionType=new; clientMethod=wmsCommon.openAddWin('weekReport','weekReport_edit','800','600');")
                        $render.RenderButton(" text=删除; displayType=button ; actionType=delete; clientMethod=wmsCommon.deleteRecords('contenttb','weekReport');")
                    </td>
                </tr>
            </table>
            <!--button content end-->
        </td>
    </tr>
    <!--list content start-->
    <tr>
        <td style="vertical-align: text-top;" id="listTd" onresize="changeWindowSize()">
            <div id="listDiv" class="listDivStyle">
                <table id="contenttb" cellpadding="0" cellspacing="0" class="tblList">
                    <tr class="FixedTitleRow">
                        <th style="width: 30px">
                            <span style="cursor: hand" >选择</span>
                        </th>
                        <th style="width: 20px">
                            $weekReport_list.Columns.get_Item("ROWNUM").Render()
                        </th>
                        <th>
                         报告周期
                        </th>
                        <th>
                            $weekReport_list.Columns.get_Item("departWBS").Render()
                        </th>
                        <th>
                            $weekReport_list.Columns.get_Item("userNo").Render()
                        </th>
                        <th>
                            $weekReport_list.Columns.get_Item("reportStatus").Render()
                        </th>
                       
                        <th style="width: 120px;">
                            操作
                        </th>
                    </tr>
                    #foreach($row in $weekReport_list.Rows)
                    <tr keyvalue="$row.RenderKeyValue()" onmouseout="wmsCommon.onMouseOut(this)" onmouseover="wmsCommon.onMouseOver(this)">
                        <td style="width: 30px">
                             #if($row.get_Item("reportStatus").Render()==0)<input style="cursor: hand; border: 0" type="checkbox" />
                             #else
                             <input style="cursor: hand; border: 0" type="checkbox" disabled=disabled />
                             #end
                        </td>
                        <td style="width: 20px">
                            $row.get_Item("ROWNUM").Render()
                        </td>
                        <td style="text-align: center">
                            <nobr>
                            <a href="#" style="border: 0" onclick="wmsCommon.openLookWin('$row.RenderKeyValue()','weekReport','weekReport_view')">
                                $row.get_Item("startDate").Render()&nbsp;至&nbsp$row.get_Item("endDate").Render()</a>
                                </nobr>
                        </td>
                        <td style="text-align: center">
                            <nobr>
                            $row.get_Item("departName").Render()
                              </nobr>
                        </td>
                        <td style="text-align: center">
                            <nobr>
                            $row.get_Item("displayName").Render()
                                </nobr>
                        </td>
                        <td style="text-align: center">
                            <nobr>
                           #if($row.get_Item("reportStatus").Render()==0)
                           未提交
                           #else 已提交
                           #end

                                </nobr>
                        </td>
                        <td style="width: 120px; text-align: center">
                          <NOBR>
                           #if($row.get_Item("reportStatus").Render()==0)
                            $render.RenderButton("text=修改;displayType=button;actionType=modify;clientMethod=wmsCommon.openModifyWinWithEvent(this.parentNode, 'weekReport','weekReport_edit',900,600);")
                            #end
                              </NOBR>
                        </td>
                    </tr>
                    #end
                </table>
            </div>
        </td>
    </tr>
    <!-- list content end-->
    <tr>
        <td style="height: 20px; vertical-align: text-bottom">
            <div style="height: 20px; background-color: rgb(233, 231, 215); text-align: center;
                vertical-align: bottom">
                $render.RenderPaging($weekReport_list)
            </div>
        </td>
    </tr>
</table>
